projects
/
gtk4.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
93abd8d
)
multiselection: Don't emit nonsensical signals
author
Matthias Clasen
<mclasen@redhat.com>
Sat, 6 Jun 2020 03:15:20 +0000
(23:15 -0400)
committer
Matthias Clasen
<mclasen@redhat.com>
Sat, 6 Jun 2020 03:15:20 +0000
(23:15 -0400)
I forgot to add a check here. We only want to emit
a ::selection-changed if we actually changed it.
gtk/gtkmultiselection.c
patch
|
blob
|
history
diff --git
a/gtk/gtkmultiselection.c
b/gtk/gtkmultiselection.c
index 31572072a74bfa9167733db154c315820d1bb048..9f2daae44afdc8d33f960bb34cddb9ed7c422d99 100644
(file)
--- a/
gtk/gtkmultiselection.c
+++ b/
gtk/gtkmultiselection.c
@@
-212,7
+212,8
@@
gtk_multi_selection_add_or_remove (GtkSelectionModel *model,
}
while (n > 0);
- gtk_selection_model_selection_changed (model, min, max - min + 1);
+ if (min <= max)
+ gtk_selection_model_selection_changed (model, min, max - min + 1);
return TRUE;
}